package com.lagou.demo.listener;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.stereotype.Component;

@Component
public class MyMessageListener {

    @RabbitListener(queues = "queue.boot")
    public void getMyMessage(@Payload String message){
        System.out.println(message);
    }

}
